package com.cyrene.stock.controller;
import com.cyrene.stock.api.StockControllerAPI;
import com.cyrene.stock.entity.StockBusiness;
import com.cyrene.stock.response.ResponseResult;
import com.cyrene.stock.service.StockService;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author:Shuna
 * @Date: 2025/11/07 9:59
 * @Description:
 */
@RestController
public class StockController implements StockControllerAPI{

    private final StockService stockService;

    public StockController(StockService stockService) {
        this.stockService = stockService;
    }

    @Override
    public ResponseResult<List<StockBusiness>> getAllStockBusiness() {
        List<StockBusiness> stockBusiness = stockService.getStockBusiness();
        return ResponseResult.ok(stockBusiness);
    }

}
